Skip to content

Conversation

@sumoanema
Copy link

PR Details

Changes for making extension work with lambda elevator environment

Description

Attached the details of the changes made
ELEVATOR_MODE_IMPLEMENTATION.md

Related Issue

Checklist

  • Updated CHANGELOG.md.
  • Ran unit tests locally.

@sumoanema sumoanema requested a review from a team as a code owner November 28, 2025 08:14
@sumoanema sumoanema requested a review from Copilot November 28, 2025 08:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements support for Lambda elevator mode (lambda-managed-instances) in the extension. The changes enable the extension to operate in two modes: standard mode (existing behavior) and elevator mode (new behavior), determined by the AWS_LAMBDA_INITIALIZATION_TYPE environment variable.

Key Changes:

  • Introduces new elevator producer/consumer architecture that uses HTTP server for receiving telemetry data and flush signaling mechanism
  • Modifies extension initialization and registration to conditionally support elevator mode
  • Updates Telemetry API schema version to "2025-01-29" for elevator mode

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lambda-extensions/workers/elevatorProducer.go New HTTP server implementation for receiving telemetry data in elevator mode with queue threshold monitoring
lambda-extensions/workers/elevatorConsumer.go New consumer implementation for processing queued telemetry data with signal-based flushing
lambda-extensions/sumologic-extension.go Main extension modified to detect and initialize elevator mode based on environment variable
lambda-extensions/lambdaapi/telemetryapiclient.go Updated to conditionally use different schema version based on mode
lambda-extensions/lambdaapi/extensionapiclient.go Modified to register different event types based on mode
lambda-extensions/lambdaapi/telemetryapiclient_test.go Test updated to pass new isElevator parameter
lambda-extensions/lambdaapi/extensionapiclient_test.go Test updated to pass new isElevator parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


var rawMsgArr [][]byte
var logsStr string
var runtime_done = 0
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name 'runtime_done' uses snake_case which is inconsistent with Go naming conventions. It should be renamed to 'runtimeDone' to follow camelCase style.

Copilot uses AI. Check for mistakes.

var rawMsgArr [][]byte
var logsStr string
var runtime_done = 0
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'runtime_done' is initialized to 0 but never modified, making it a constant value. This variable appears to serve no functional purpose in the current implementation and should be removed along with its return value, or the function should be updated to return the actual count of messages processed.

Copilot uses AI. Check for mistakes.
Comment on lines +162 to +163
esc.logger.Debugf("Elevator Consumer: DrainQueue complete. Runtime done: %d", runtime_done)
return runtime_done
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'runtime_done' is initialized to 0 but never modified, making it a constant value. This variable appears to serve no functional purpose in the current implementation and should be removed along with its return value, or the function should be updated to return the actual count of messages processed.

Copilot uses AI. Check for mistakes.
@sumoanema sumoanema changed the title Changes for making extension work with lambda elevator environment Changes for making extension work with lambda managed instance environment Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants